package com.andova.component.net

import android.content.Context
import java.io.File
import java.lang.ref.WeakReference

interface NetworkSusCall2 {
    fun request(context: WeakReference<Context>, callback: NetworkSusCallback2<out ResponseModel>?, call: Any?)

    /**
     * @param callback msg contain [Throwable] for exception, [Int] for progress, and [File] for result file.
     */
    fun download(url: String, dest: File, callback: (msg: Any) -> Unit)
    fun download(url: String, path: String, callback: (msg: Any) -> Unit)

    /**
     * 版本信息
     */
    fun version(): String
}